package com.yun.zf.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yun.zf.common.admin.model.activity.CouponAddMo;
import com.yun.zf.common.app.domain.SysCoupon;
import com.yun.zf.common.app.dto.center.CouponListDto;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * <p>
 * 优惠券表 服务类
 * </p>
 *
 * @author cj
 * @since 2021-05-31
 */
public interface SysCouponService extends IService<SysCoupon> {

    public int addCoupon(CouponAddMo couponAddMo);

    public SysCoupon getCouponByType(int type);

    @Cacheable(value = "getCouponList",key = "#activityId")
    public List<CouponListDto> getCouponList(String activityId);

    public SysCoupon getCoupon(Long id);
}
